@layout("/common/_container.html",{js:["/assets/modular/system/dept/dept.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">部门管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md4 layui-col-lg3">
            <div class="layui-card">
                <div class="layui-card-body mini-bar">
                    <div id="layuiTree" style="height: calc(93vh); overflow: scroll;"></div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm12 layui-col-md8 layui-col-lg9">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <input id="searchWords" class="layui-input" type="text" placeholder="部门简称/全称/描述"/>
                            </div>
                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn layui-btn-sm layui-btn-primary"><i class="layui-icon layui-icon-search"></i>搜索</button>
                                @if(shiro.hasPermission("/system/dept/toAdd")){
                                <button id="btnAdd" class="layui-btn icon-btn layui-btn-sm layui-btn-normal"><i class="layui-icon layui-icon-add-circle"></i>添加</button>
                                @}
                                @if(shiro.hasPermission("/system/dept/sort")){
                                <button id="sort" class="layui-btn icon-btn  layui-btn-sm"><i class="layui-icon layui-icon-more-vertical"></i>排序</button>
                                @}
                            </div>
                        </div>
                    </div>

                    <table class="layui-table" id="deptTable" lay-filter="deptTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">
    @if(shiro.hasPermission("/system/dept/toUpdate")){
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="update">修改</a>
    @}
    @if(shiro.hasPermission("/system/dept/delete")){
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    @}
</script>
@}